/**
 * 
 */
package com.tvshows.front.listener.command;

import org.apache.log4j.Logger;

import com.tvshows.front.controllers.dialog.ActionsController;
import com.tvshows.front.listener.command.interfaces.RecapCommand;
import com.tvshows.front.ui.recap.UpsideCompositeRecapUI;

/**
 * @author Tangi Midy
 * <p>
 * Add Link command
 * </p>
 */
public class AddLinkCommand
    extends RecapCommand
{

    /**
     * The {@link UpsideCompositeRecapUI}
     */
    private UpsideCompositeRecapUI upsideComposite;

    /**
     * Logger of the class
     */
    private static Logger logger = Logger.getLogger( AddLinkCommand.class );

    /**
     * @see com.tvshows.front.listener.command.interfaces.FavoriteCommand#executeCommand()
     */
    @Override
    public void executeCommand()
    {
        logger.info( "Tentative d'ajout du lien aux téléchargements torrent" );
        ActionsController.addLiveLink( upsideComposite, upsideComposite.getParent() );
    }

    /**
     * @param upsideComposite the composite to apply
     */
    public AddLinkCommand( UpsideCompositeRecapUI upsideComposite )
    {
        this.upsideComposite = upsideComposite;
    }

}
